package stdio.costa.imoca.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;

@Entity
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@XmlSeeAlso({ Postcard.class })
public class Payment extends UuidEntity implements Serializable {

	private static final long serialVersionUID = 3785012172022179463L;

	@OneToMany(fetch = FetchType.LAZY)
	private List<Postcard> postcards;

	public List<Postcard> getPostcards() {
		return postcards;
	}

	public void setPostcards(List<Postcard> postcards) {
		this.postcards = postcards;
	}
}
